#include <iostream>

using namespace std;

int main(void)
{
    int a = 10;
    int b = 10;

    const int *p1 = &a;
    p1 = &b;
    //*p1 = 20;
    //可改指向，不可改值

    int *const p2 = &a;
    //p2 = &b;
    *p2 = 20;
    //可改值，不可改指向

    // const后有 * 就不能改值
    // const后无 * 就可以改值

    const int *const p3 = &a;
    //p3 = &b;
    //*p3 = 20;

    return 0;
}